<template>
	<view>
		<z-paging-mini ref='paging' v-model="list" @query="getList" default-page-size='15'>
			<view class="p-15  box-sizing">
				<view class="py-10 flex flex-x-space-between flex-y-center border-bottom-grey"
					v-for="(item,index) in list" :key='index'>
					<view class="flex flex-column line-height-1">
						<text class="text-white">{{item.desc}}</text>
						<text class="fs-13 text-999">{{item.create_at}}</text>
					</view>
					<text class="fs-17 fw-600"
						:class="item.type=='1'?'blue':'red'">{{item.type=='1'?'-':'+'}}{{item.points}}</text>
				</view>
			</view>
		</z-paging-mini>
	</view>
</template>

<script setup>
	import useZPaging from "@/uni_modules/z-paging-mini/components/z-paging-mini/js/hooks/useZPaging.js";
	import { ref } from 'vue';
	import { $http } from '@/utils'
	import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
	const list = ref()
	const paging = ref()
	useZPaging(paging)
	const getList = (page, limit) => {
		$http.get('Capital/getList', { page: page, limit: limit }).then(res => {
			paging.value.complete(res.data);
		})
	}
</script>

<style>
	page {
		background-color: #181818;
	}

	.red {
		color: #FF4444;
	}

	.blue {
		color: #2180F6;
	}
</style>